<!DOCTYPE html>
<html lang="en" xmlns:th="http://www.w3.org/1999/xhtml">
<head>
    <meta charset="utf-8">
    <title>用户列表</title>
    <meta name="renderer" content="webkit">
    <meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1">
    <meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=1">
    <meta name="apple-mobile-web-app-status-bar-style" content="black">
    <meta name="apple-mobile-web-app-capable" content="yes">
    <meta name="format-detection" content="telephone=no">
    <link rel="stylesheet" href="resources/layui/css/layui.css" media="all" />
    <link rel="stylesheet" href="resources/css/public.css" media="all" />
</head>
<body class="childrenBody">

<!--给用户分配角色的弹出层-->
<div style="padding: 10px;"  id="selectUserRoleDiv">
    请确认，删除此贴以及帖子的所有回复
    <input type="hidden" id="idHiden"></input>
    <div style="margin-top: 10px;margin-left: 50px">
    <button type="button" class="layui-btn layui-btn-primary" id="giveupBtn">取消</button>
    <button type="button" class="layui-btn layui-btn-danger" id="yesBtn">删除所有</button>
    </div>
</div>
<script type="text/javascript" src="resources/layui/layui.js"></script>
<script th:inline="none">
    layui.use(['form','layer','laydate','table','laytpl'],function(){
        var form = layui.form,
            layer = parent.layer === undefined ? layui.layer : top.layer,
            $ = layui.jquery,
            laydate = layui.laydate,
            laytpl = layui.laytpl

        var did=$("#idHiden").val();


        //删帖
        $("#yesBtn").click(function () {

            $.ajax({
                type:"POST",
                url:"deleteDiscussion",
                data:{dId:did},
                success:function (res) {
                    if(res.code=200){
                        var index1=parent.layer.getFrameIndex(window.name)
                        parent.layer.close(index1);
                        layer.msg(res.msg);

                    }else if(res.code=401){
                        layer.msg(res.msg);
                    }
                }

            });
        });

    })

</script>
</body>
</html>